<template xmlns:el-table="http://www.w3.org/1999/html">
  <el-container class="container" style="height: 100%">
    <el-header class="header">
      <div style="height: 50px;line-height: 50px;border-bottom: 1px solid #CCC; display: flex">
        <div style="width: 200px;padding-left: 30px;font-weight: bold;color: deepskyblue">后台系统</div>
        <div style="flex: 1"></div>
        <div style="width: 100px"></div>
        {{ user }}
      </div>
    </el-header>
    <el-container style="min-height: 100vh">
      <el-aside class="aside" style="min-height: 100vh">
        <el-menu
          default-active="2"
          class="el-menu-vertical-demo"
          background-color="#545c64"
          text-color="#fff"
          style="min-height: 100vh"

        >
          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>管理员功能</span>
            </template>
            <el-menu-item-group>
              <template slot="title">用户管理</template>
              <el-menu-item index="1-1" @click="CheckOrChange()">查看/编辑用户信息</el-menu-item>
            </el-menu-item-group>
          </el-submenu>
        </el-menu>
      </el-aside>
      <el-main class="main">
        <h2>欢迎您！</h2>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
  export default {
    data() {
      return {
        user: sessionStorage.getItem('userid'),
        test: [
          {
            teacherid: '2016-05-03',
            userid: 'Tom',
            tname: 'California',
            tphone: 'Los Angeles',
          },
        ],
        ruleForm: {
          teacherid: '',
          userid: '',
          tname: '',
          tphone: '',
        },
      }
    },

    name: "Home",
    methods: {
      changePwd() {
        var me = this;
        // print()
        me.$router.push({
          path: '/changePassword',
          query: {usersid: sessionStorage.getItem('userid')}
        })
      },
      showClass() {
        var me = this;
        // print()
        me.$router.push({
          path: '/admin-class'
        })
      },
      //查看/编辑
      CheckOrChange() {
        var me = this;
        // print()
        me.$router.push({
          path: '/adminusers',
        })
      },
    },
  }
</script>
<style scoped>
  .container {
    height: 100%;
    font-size: 15px;
  }

</style>
